﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChartManager.Models
{
    /// <summary>
    /// 榜单行
    /// </summary>
    public class ChartRow
    {
        /// <summary>
        /// id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 所属榜单
        /// </summary>
        [Required]
        public virtual Chart Chart { get; set; }
        /// <summary>
        /// 排名
        /// </summary>
        [Range(1, Constants.SongsCount)]
        public int Rank { get; set; }
        /// <summary>
        /// 歌曲
        /// </summary>
        [Required]
        public virtual Song Song { get; set; }
        /// <summary>
        /// 上周排名
        /// </summary>
        [Range(1, Constants.SongsCount)]
        public int? LastWeek { get; set; }
        /// <summary>
        /// 在榜次数
        /// </summary>
        public int WeekOn { get; set; }
        /// <summary>
        /// 最高排名
        /// </summary>
        [Range(1, Constants.SongsCount)]
        public int Peak { get; set; }
    }
}
